<template>
  <el-drawer
    title="报价单详情"
    :visible.sync="drawer"
    :direction="direction"
    :before-close="handleClose"
    class="drawer-main"
  >
    <div class="content">
      <h4 class="group-title">询价信息</h4>
      <div class="detail">
        <div class="item">
          <span>型号</span>
          <span>H1</span>
        </div>

        <div class="item">
          <span>品牌</span>
          <span>KEMET</span>
        </div>

        <div class="item">
          <span>数量</span>
          <span>1000</span>
        </div>

        <div class="item">
          <span>批次</span>
          <span>1</span>
        </div>

        <div class="item">
          <span>封装</span>
          <span>XXXXXW5</span>
        </div>

        <div class="item">
          <span>接受价 </span>
          <span>10.000000</span>
        </div>

        <div class="item">
          <span>币种</span>
          <span>人民币</span>
        </div>

        <div class="item">
          <span>交货日期 </span>
          <span>2022-11-11</span>
        </div>

        <div class="item">
          <span>交货地:</span>
          <span>国内</span>
        </div>

        <div class="item">
          <span>包装: </span>
          <span>卷带</span>
        </div>

        <div class="item">
          <span>发票类型: </span>
          <span>增值税专用发票</span>
        </div>
      </div>

      <h4 class="group-title">报价信息</h4>
      <div class="detail">
        <div class="item">
          <span>报价:</span>
          <span class="color-red">12.000000</span>
        </div>

        <div class="item">
          <span>币种:</span>
          <span>人民币</span>
        </div>

        <div class="item">
          <span>数量</span>
          <span>1000</span>
        </div>
        <div class="item">
          <span>交货日期 </span>
          <span>2022-11-11</span>
        </div>

        <div class="item">
          <span>批次:</span>
          <span>1</span>
        </div>

        <div class="item">
          <span>包装: </span>
          <span>卷带</span>
        </div>

        <div class="item">
          <span>交货地: </span>
          <span>国内</span>
        </div>
      </div>

      <div class="third">
        <h4 class="group-title">我的议价</h4>
        <div class="remain-time" v-if="isShow">
          <span style="margin-right: 10px">议价剩余有效期:</span>
          <!-- <CountDown
            class="color-red"
            :currentTime="1481450106"
            :startTime="1481450110"
            :endTime="1481450115"
            :endText="'结束自定义文字2'"
          >
          </CountDown> -->
          <span class="color-red">18:23:21</span>
        </div>
      </div>

      <div class="detail">
        <div class="item">
          <span>议价价格:</span>
          <span class="color-red">12.000000</span>
        </div>

        <div class="item">
          <span>币种:</span>
          <span>人民币</span>
        </div>

        <div class="item">
          <span>议价数量</span>
          <span>1000</span>
        </div>
        <div class="item">
          <span>交货日期 </span>
          <span>2022-11-11</span>
        </div>

        <div class="item">
          <span>交货地:</span>
          <span>国内</span>
        </div>

        <div class="item">
          <span>议价有效期: </span>
          <span>2022-11-11</span>
        </div>

        <div class="item">
          <span>备注: </span>
          <span>xxxxxxxxxxxxxxxxxxx</span>
        </div>
      </div>

      <div class="third">
        <h4 class="group-title">卖家议价</h4>
        <div class="remain-time" v-if="!isShow">
          <span style="margin-right: 10px">议价剩余有效期:</span>
          <!-- <CountDown
            class="color-red"
            :currentTime="1481450106"
            :startTime="1481450110"
            :endTime="1481450115"
            :endText="'结束自定义文字2'"
          >
          </CountDown> -->
          <span class="color-red">18:23:21</span>
        </div>
      </div>

      <div class="detail">
        <div class="item">
          <span>议价价格:</span>
          <span class="color-red">12.000000</span>
        </div>

        <div class="item">
          <span>币种:</span>
          <span>人民币</span>
        </div>

        <div class="item">
          <span>议价数量</span>
          <span>1000</span>
        </div>
        <div class="item">
          <span>交货日期 </span>
          <span>2022-11-11</span>
        </div>

        <div class="item">
          <span>交货地:</span>
          <span>国内</span>
        </div>

        <div class="item">
          <span>议价有效期: </span>
          <span>2022-11-11</span>
        </div>

        <div class="item">
          <span>备注: </span>
          <span>xxxxxxxxxxxxxxxxxxx</span>
        </div>
      </div>

      <div class="footer">
        <FooterBtn :btnList="btnList"></FooterBtn>
        <!-- <el-button size="small">取消议价</el-button>
        <el-button size="small">取消</el-button> -->
      </div>
    </div>
  </el-drawer>
</template>

<script>
import CountDown from "vue2-countdown";
import FooterBtn from "../../receiveQuotedPrice/components/FooterBtn.vue";
import { btnList} from "../data/btnDataList.js";

export default {
  name: "DickerDrawer",
  props: ["drawer"],
  components: {
    CountDown,
    FooterBtn,
  },
  data() {
    return {
      btnList:btnList.filter((item) => item.type === 1),
      isShow: false,
      direction: "rtl",
      currentTime: 0,
      startTime: 0,
      endTime: 0,
    };
  },
  methods: {
    handleClose() {
      this.$emit("close");
    },
  },
  created() {},
};
</script>
<style lang="scss" scoped>
.content {
  margin-left: 20px;
  margin-right: 20px;
}
.group-title {
  margin-bottom: 10px;
  margin-top: 10px;
  color: #442a8d;
}
.detail {
  display: flex;
  flex-wrap: wrap;
  padding: 10px 15px;
  border: 1px solid rgba(228, 228, 228, 1);
  .item {
    width: 45%;
    margin-bottom: 10px;
  }
}

.third {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
.color-red {
  color: red;
}
.remain-time {
  display: flex;
}
.drawer-main {
  // position: relative;
}
.footer {
  position: absolute;
  bottom: 20px;
  display: flex;
  justify-content: center;
  width: 100%;
  button {
    width: 80px;
  }
  button:nth-child(1) {
    background-color: rgb(217, 0, 27);
    color: #ffffff;
  }
}
</style>
